In this article, we show that the magnetohydrodynamic system in $\mathbb{R}^N$ with variable density, variable viscosity and variable conductivity has a local weak solution in the Besov space $\dot{B}^{N/p_1}_{p_1,1}(\mathbb{R}^N)\times\dot{B}^{(N/p_2)-1}_{p_2,1}(\mathbb{R}^N) \times\dot{B}^{(N/p_2)-1}_{p_2,1}(\mathbb{R}^N)$ for all $1<p_2<+\infty$ and some $1<p_1\leq2N/3$ if the initial density approaches a positive constant. Moreover, this solution is unique if we impose the restrictive condition $1<p_2\leq2N$. We also prove that the constructed solution exists globally in time if the initial data are small. In particular, this allows us to work in the framework of Besov space with negative regularity indices and this fact is particularly important when the initial data are strongly oscillating.